#pragma once
#ifdef _LINUX_
#define __stdcall
#endif

enum ClientContext{
	CC_PROTOCOL = 0x0,
};

enum ServerContext{
	
};

/*
 *	连接上下文
 */
struct IClientContext
{
	virtual void __stdcall	AddRef() = 0;
	virtual void __stdcall	Release() = 0;
	virtual bool __stdcall	GetContext(ClientContext cc, void* p) = 0;
	virtual bool __stdcall	Send(unsigned char* pSend, int nLen) = 0;
};

/*
 *	ServerContext
 */
struct IServerContext
{
	virtual bool __stdcall	GetContext(ServerContext sc, void* p) = 0;
	virtual bool __stdcall	FindClient(const char* pClientID, IClientContext** ppCC) = 0;
};

/*
 *	服务器接到一个命令处理
 */
struct IServerRequest
{
	virtual void __stdcall	RequestCommand(IServerContext* pSC, IClientContext* pCC
		, unsigned char* pRecv, int nLen) = 0;
};
